package com.net.oil.main.presenter;

import com.net.oil.base.BasePresenter;
import com.net.oil.main.bean.AdBean;
import com.net.oil.main.contract.WelcomeContract;
import com.net.oil.main.model.WelcomeModel;

import java.util.List;

/**
 * 作者：lch
 * 时间：2018/5/24 0024:下午 20:14
 * 邮箱：245850413@qq.com
 * 说明：
 */

public class WelcomePresenter extends BasePresenter<WelcomeContract.View> implements WelcomeContract.Presenter {

    private WelcomeContract.View view;
    private WelcomeContract.Model model;

    public WelcomePresenter(WelcomeContract.View view) {
        this.view = view;
        model = new WelcomeModel(this);
    }

    @Override
    protected void unSubscribe() {
        model.unSubscribe();
    }

    @Override
    public void getAdList() {
        model.getAdList();
    }

    @Override
    public void getAdListSuccess(List<AdBean> adBeans) {
        view.getAdListSuccess(adBeans);
    }

    @Override
    public void getAdListFailed() {
        view.getAdListFailed();
    }
}
